/*
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 * 
 * The Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
 *
 * The Initial Developer of the Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
 * Portions created by Mark A. Kobold are Copyright (C) 2000-2007. All Rights Reserved.
 *
 * Contributor(s): 
 *  Mark A. Kobold [mkobold <at> isqlviewer <dot> com].
 *  
 * If you didn't download this code from the following link, you should check
 * if you aren't using an obsolete version: http://www.isqlviewer.com
 */
package org.isqlviewer.sql;

import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Date;
import java.sql.Ref;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Map;
import org.isqlviewer.util.LocalMessages;

/**
 * TODO Add ResultSetWrapper Overview JavaDoc.
 * <p>
 * 
 * @author Mark A. Kobold &lt;mkobold at isqlviewer dot com&gt;
 * @version 1.0
 */
class ResultSetWrapper implements ResultSet {

    protected static final LocalMessages messages = new LocalMessages(ConnectionWrapper.BUNDLE_NAME);
    private ResultSet results = null;
    private ConnectionWrapper connection = null;
    private StatementWrapper statement = null;

    ResultSetWrapper(StatementWrapper statement, ResultSet results) {

        this.connection = statement.getOwner();
        this.statement = statement;
        this.results = results;
    }

    public boolean absolute(int row) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.absolute(row);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "absolute(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "absolute(int)");
            throw sqle;
        }
    }

    public void afterLast() throws SQLException {

        connection.updateLastAccess();
        try {
            results.afterLast();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "afterLast()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "afterLast()");
            throw sqle;
        }
    }

    public void beforeFirst() throws SQLException {

        connection.updateLastAccess();
        try {
            results.beforeFirst();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "beforeFirst()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "beforeFirst()");
            throw sqle;
        }
    }

    public void cancelRowUpdates() throws SQLException {

        connection.updateLastAccess();
        try {
            results.cancelRowUpdates();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "cancelRowUpdates()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "cancelRowUpdates()");
            throw sqle;
        }
    }

    public void clearWarnings() throws SQLException {

        connection.updateLastAccess();
        try {
            results.clearWarnings();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "clearWarnings()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "clearWarnings()");
            throw sqle;
        }
    }

    public void close() throws SQLException {

        connection.updateLastAccess();
        try {
            results.close();
        } catch (Throwable t) {
            error(messages.format("DataSource.GeneralMethodError", "close()"), t);
        } finally {
        }
    }

    public void deleteRow() throws SQLException {

        connection.updateLastAccess();
        try {
            results.deleteRow();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "deleteRow()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "deleteRow()");
            throw sqle;
        }
    }

    public int findColumn(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.findColumn(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "findColumn(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "findColumn(String)");
            throw sqle;
        }
    }

    public boolean first() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.first();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "first()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "first()");
            throw sqle;
        }
    }

    public Array getArray(int i) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getArray(i);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getArray(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getArray(int)");
            throw sqle;
        }
    }

    public Array getArray(String colName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getArray(colName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getArray(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getArray(String)");
            throw sqle;
        }
    }

    public InputStream getAsciiStream(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getAsciiStream(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getAsciiStream(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getAsciiStream(int)");
            throw sqle;
        }
    }

    public InputStream getAsciiStream(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getAsciiStream(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getAsciiStream(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getAsciiStream(String)");
            throw sqle;
        }
    }

    public BigDecimal getBigDecimal(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBigDecimal(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getBigDecimal(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getBigDecimal(int)");
            throw sqle;
        }
    }

    public BigDecimal getBigDecimal(int columnIndex, int ignored) throws SQLException {

        return getBigDecimal(columnIndex);
    }

    public BigDecimal getBigDecimal(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBigDecimal(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getBigDecimal(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getBigDecimal(String)");
            throw sqle;
        }
    }

    public BigDecimal getBigDecimal(String columnName, int ignored) throws SQLException {

        return getBigDecimal(columnName);
    }

    public InputStream getBinaryStream(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBinaryStream(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getBinaryStream(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getBinaryStream(int)");
            throw sqle;
        }
    }

    public InputStream getBinaryStream(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBinaryStream(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getBinaryStream(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getBinaryStream(String)");
            throw sqle;
        }
    }

    public Blob getBlob(int i) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBlob(i);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getBlob(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getBlob(int)");
            throw sqle;
        }
    }

    public Blob getBlob(String colName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBlob(colName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getBlob(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getBlob(String)");
            throw sqle;
        }
    }

    public boolean getBoolean(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBoolean(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getBoolean(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getBoolean(int)");
            throw sqle;
        }
    }

    public boolean getBoolean(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBoolean(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getBoolean(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getBoolean(String)");
            throw sqle;
        }
    }

    public byte getByte(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getByte(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getByte(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getByte(int)");
            throw sqle;
        }
    }

    public byte getByte(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getByte(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getByte(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getByte(String)");
            throw sqle;
        }
    }

    public byte[] getBytes(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBytes(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getBytes(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getBytes(int)");
            throw sqle;
        }
    }

    public byte[] getBytes(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBytes(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getBytes(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getBytes(String)");
            throw sqle;
        }
    }

    public Reader getCharacterStream(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getCharacterStream(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getCharacterStream(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getCharacterStream(int)");
            throw sqle;
        }
    }

    public Reader getCharacterStream(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getCharacterStream(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getCharacterStream(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getCharacterStream(String)");
            throw sqle;
        }
    }

    public Clob getClob(int i) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getClob(i);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getClob(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getClob(int)");
            throw sqle;
        }
    }

    public Clob getClob(String colName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getClob(colName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getClob(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getClob(String)");
            throw sqle;
        }
    }

    public int getConcurrency() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getConcurrency();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getConcurrency()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getConcurrency()");
            throw sqle;
        }
    }

    public String getCursorName() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getCursorName();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getCursorName()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getCursorName()");
            throw sqle;
        }
    }

    public Date getDate(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getDate(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDate(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDate(int)");
            throw sqle;
        }
    }

    public Date getDate(int columnIndex, Calendar cal) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getDate(columnIndex, cal);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDate(int,Calendar)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDate(int,Calendar)");
            throw sqle;
        }
    }

    public Date getDate(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getDate(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDate(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDate(String)");
            throw sqle;
        }
    }

    public Date getDate(String columnName, Calendar cal) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getDate(columnName, cal);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDate(String,Calendar)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDate(String,Calendar)");
            throw sqle;
        }
    }

    public double getDouble(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getDouble(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDouble(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDouble(int)");
            throw sqle;
        }
    }

    public double getDouble(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getDouble(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getDouble(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getDouble(String)");
            throw sqle;
        }
    }

    public int getFetchDirection() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getFetchDirection();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getFetchDirection()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getFetchDirection()");
            throw sqle;
        }
    }

    public int getFetchSize() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getFetchSize();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getFetchSize()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getFetchSize()");
            throw sqle;
        }
    }

    public float getFloat(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getFloat(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getFloat(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getFloat(int)");
            throw sqle;
        }
    }

    public float getFloat(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getFloat(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getFloat(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getFloat(String)");
            throw sqle;
        }
    }

    public int getInt(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getInt(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getInt(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getInt(int)");
            throw sqle;
        }
    }

    public int getInt(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getInt(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getInt(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getInt(String)");
            throw sqle;
        }
    }

    public long getLong(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getLong(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getLong(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getLong(int)");
            throw sqle;
        }
    }

    public long getLong(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getLong(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getLong(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getLong(String)");
            throw sqle;
        }
    }

    public ResultSetMetaData getMetaData() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getMetaData();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getMetaData()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMetaData()");
            throw sqle;
        }
    }

    public Object getObject(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getObject(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getObject(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMap(int)");
            throw sqle;
        }
    }

    public Object getObject(int i, Map<String, Class< ? >> map) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getObject(i, map);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getObject(int,Map)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMap(int,Map)");
            throw sqle;
        }
    }

    public Object getObject(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getObject(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getObject(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMap(String)");
            throw sqle;
        }
    }

    public Object getObject(String colName, Map<String, Class< ? >> map) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getObject(colName, map);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getObject(String,Map)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getMap(String,Map)");
            throw sqle;
        }
    }

    public Ref getRef(int i) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getRef(i);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getRef(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getRef(int)");
            throw sqle;
        }
    }

    public Ref getRef(String colName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getRef(colName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getRef(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getRef(String)");
            throw sqle;
        }
    }

    public int getRow() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getRow();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getRow()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getRow()");
            throw sqle;
        }
    }

    public short getShort(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getShort(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getShore(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getShort(int)");
            throw sqle;
        }
    }

    public short getShort(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getShort(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getShore(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getShort(String)");
            throw sqle;
        }
    }

    public Statement getStatement() throws SQLException {

        connection.updateLastAccess();
        try {
            return statement;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getStatement()");
            throw sqle;
        }
    }

    public String getString(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getString(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getString(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getString(int)");
            throw sqle;
        }
    }

    public String getString(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getString(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getString(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getString(String)");
            throw sqle;
        }
    }

    public Time getTime(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getTime(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTime(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTimes(int)");
            throw sqle;
        }
    }

    public Time getTime(int columnIndex, Calendar cal) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getTime(columnIndex, cal);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTime(int,Calendar)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTimes(int,Calendar)");
            throw sqle;
        }
    }

    public Time getTime(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getTime(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTime(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTimes(String)");
            throw sqle;
        }
    }

    public Time getTime(String columnName, Calendar cal) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getTime(columnName, cal);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTime(String,Calendar)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTimes(String,Calendar)");
            throw sqle;
        }
    }

    public Timestamp getTimestamp(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getTimestamp(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTimestamp(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTimestamp(int)");
            throw sqle;
        }
    }

    public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getTimestamp(columnIndex, cal);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTimestamp(int,Calendar)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTimestamp(int,Calendar)");
            throw sqle;
        }
    }

    public Timestamp getTimestamp(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getTimestamp(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTimestamp(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTimestamp(String)");
            throw sqle;
        }
    }

    public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getTimestamp(columnName, cal);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getTimestamp(String,Calendar)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getTimestamp(String,Calendar)");
            throw sqle;
        }
    }

    public int getType() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getType();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getType()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getType()");
            throw sqle;
        }
    }

    public InputStream getUnicodeStream(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBinaryStream(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getUnicodeStream(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getUnicodeStream(int)");
            throw sqle;
        }
    }

    public InputStream getUnicodeStream(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getBinaryStream(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getUnicodeStream(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getUnicodeStream(String)");
            throw sqle;
        }
    }

    public URL getURL(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getURL(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getURL(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getURL(int)");
            throw sqle;
        }
    }

    public URL getURL(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getURL(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getURL(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getURL(String)");
            throw sqle;
        }
    }

    public SQLWarning getWarnings() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.getWarnings();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "getWarnings()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "getWarnings()");
            throw sqle;
        }
    }

    public void insertRow() throws SQLException {

        connection.updateLastAccess();
        try {
            results.insertRow();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "insertRow()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "insertRow()");
            throw sqle;
        }
    }

    public boolean isAfterLast() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.isAfterLast();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "isAfterLast()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "isAfterLast()");
            throw sqle;
        }
    }

    public boolean isBeforeFirst() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.isBeforeFirst();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "isBeforeFirst()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "isBeforeFirst()");
            throw sqle;
        }
    }

    public boolean isFirst() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.isFirst();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "isFirst()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "isFirst()");
            throw sqle;
        }
    }

    public boolean isLast() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.isLast();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "isLast()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "isLast()");
            throw sqle;
        }
    }

    public boolean last() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.last();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "last()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "last()");
            throw sqle;
        }
    }

    public void moveToCurrentRow() throws SQLException {

        connection.updateLastAccess();
        try {
            results.moveToCurrentRow();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "moveToCurrentRow()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "moveToCurrentRow()");
            throw sqle;
        }
    }

    public void moveToInsertRow() throws SQLException {

        connection.updateLastAccess();
        try {
            results.moveToInsertRow();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "moveToInsertRow()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "moveToInsertRow()");
            throw sqle;
        }
    }

    public boolean next() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.next();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "next()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "next()");
            throw sqle;
        }
    }

    public boolean previous() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.previous();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "previous()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "previous()");
            throw sqle;
        }
    }

    public void refreshRow() throws SQLException {

        connection.updateLastAccess();
        try {
            results.refreshRow();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "refreshRow()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "refreshRow()");
            throw sqle;
        }
    }

    public boolean relative(int rows) throws SQLException {

        connection.updateLastAccess();
        try {
            return results.relative(rows);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "relative(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "relative(int)");
            throw sqle;
        }
    }

    public boolean rowDeleted() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.rowDeleted();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "rowDeleted()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "rowDeleted()");
            throw sqle;
        }
    }

    public boolean rowInserted() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.rowInserted();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "rowInserted()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "rowInserted()");
            throw sqle;
        }
    }

    public boolean rowUpdated() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.rowUpdated();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "rowUpdated()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "rowUpdated()");
            throw sqle;
        }
    }

    public void setFetchDirection(int direction) throws SQLException {

        connection.updateLastAccess();
        try {
            results.setFetchDirection(direction);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "setFetchDirection(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "setFetchDirection(int)");
            throw sqle;
        }
    }

    public void setFetchSize(int rows) throws SQLException {

        connection.updateLastAccess();
        try {
            results.setFetchSize(rows);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "setFetchSize(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "setFetchSize(int)");
            throw sqle;
        }
    }

    public void updateArray(int columnIndex, Array x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateArray(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateArray(int,Array)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateArray(int,Array)");
            throw sqle;
        }
    }

    public void updateArray(String columnName, Array x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateArray(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateArray(String,Array)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateArray(String,Array)");
            throw sqle;
        }
    }

    public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateAsciiStream(columnIndex, x, length);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateAsciiStream(int,InputStream,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateAsciiStream(int,InputStream,int)");
            throw sqle;
        }
    }

    public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateAsciiStream(columnName, x, length);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateAsciiStream(String,InputStream,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateAsciiStream(String,InputStream,int)");
            throw sqle;
        }
    }

    public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateBigDecimal(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateBigDecimal(int,BigDecimal)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateBigDecimal(int,BigDecimal)");
            throw sqle;
        }
    }

    public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateBigDecimal(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateBigDecimal(String,BigDecimal)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateBigDecimal(String,BigDecimal)");
            throw sqle;
        }
    }

    public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateBinaryStream(columnIndex, x, length);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateBinaryStream(int,InputStream,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateBinaryStream(int,InputStream,int)");
            throw sqle;
        }
    }

    public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateBinaryStream(columnName, x, length);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateBinaryStream(String,InputStream,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateBinaryStream(String,InputStream,int)");
            throw sqle;
        }
    }

    public void updateBlob(int columnIndex, Blob x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateBlob(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateBlob(int,Blob)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateBlob(int,Blob)");
            throw sqle;
        }
    }

    public void updateBlob(String columnName, Blob x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateBlob(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateBlob(String,Blob)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateBlob(String,Blob)");
            throw sqle;
        }
    }

    public void updateBoolean(int columnIndex, boolean x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateBoolean(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateBoolean(int,boolean)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateBoolean(int,boolean)");
            throw sqle;
        }
    }

    public void updateBoolean(String columnName, boolean x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateBoolean(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateBoolean(String,boolean)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateBoolean(String,boolean)");
            throw sqle;
        }
    }

    public void updateByte(int columnIndex, byte x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateByte(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateByte(int,byte)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateByte(int,byte)");
            throw sqle;
        }
    }

    public void updateByte(String columnName, byte x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateByte(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateByte(String,byte)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateByte(String,byte)");
            throw sqle;
        }
    }

    public void updateBytes(int columnIndex, byte[] x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateBytes(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateBytes(int,byte[])"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateBytes(int,byte[])");
            throw sqle;
        }
    }

    public void updateBytes(String columnName, byte[] x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateBytes(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateBytes(String,byte[])"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateBytes(String,byte[])");
            throw sqle;
        }
    }

    public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateCharacterStream(columnIndex, x, length);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateCharacterStream(int,Reader,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateCharacterStream(int,Reader,int)");
            throw sqle;
        }
    }

    public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateCharacterStream(columnName, reader, length);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateCharacterStream(String,Reader,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateCharacterStream(String,Reader,int)");
            throw sqle;
        }
    }

    public void updateClob(int columnIndex, Clob x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateClob(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateClob(int,Clob)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateClob(int,Clob)");
            throw sqle;
        }
    }

    public void updateClob(String columnName, Clob x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateClob(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateClob(String,Clob)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateClob(String,Clob)");
            throw sqle;
        }
    }

    public void updateDate(int columnIndex, Date x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateDate(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateDate(int,Date)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateDate(int,Date)");
            throw sqle;
        }
    }

    public void updateDate(String columnName, Date x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateDate(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateDate(String,Date)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateDate(String,Date)");
            throw sqle;
        }
    }

    public void updateDouble(int columnIndex, double x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateDouble(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateDouble(int,double)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateDouble(int,double)");
            throw sqle;
        }
    }

    public void updateDouble(String columnName, double x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateDouble(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateDouble(String,double)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateDouble(String,double)");
            throw sqle;
        }
    }

    public void updateFloat(int columnIndex, float x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateFloat(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateFloat(int,float)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateFloat(int,float)");
            throw sqle;
        }
    }

    public void updateFloat(String columnName, float x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateFloat(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateFloat(String,float)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateFloat(String,float)");
            throw sqle;
        }
    }

    public void updateInt(int columnIndex, int x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateInt(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateInt(int,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateString(int,int)");
            throw sqle;
        }
    }

    public void updateInt(String columnName, int x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateInt(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateInt(String,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateString(String,int)");
            throw sqle;
        }
    }

    public void updateLong(int columnIndex, long x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateLong(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateLong(int,long)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateLong(int,long)");
            throw sqle;
        }
    }

    public void updateLong(String columnName, long x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateLong(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateLong(String,long)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateLong(String,long)");
            throw sqle;
        }
    }

    public void updateNull(int columnIndex) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateNull(columnIndex);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateNull(int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateNull(int)");
            throw sqle;
        }
    }

    public void updateNull(String columnName) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateNull(columnName);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateNull(String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateNull(String)");
            throw sqle;
        }
    }

    public void updateObject(int columnIndex, Object x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateObject(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateObject(int,Object)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateObject(int,Object)");
            throw sqle;
        }
    }

    public void updateObject(int columnIndex, Object x, int scale) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateObject(columnIndex, x, scale);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateObject(int,Object,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateObject(int,Object,int)");
            throw sqle;
        }
    }

    public void updateObject(String columnName, Object x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateObject(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateObject(String,Object)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateObject(String,Object)");
            throw sqle;
        }
    }

    public void updateObject(String columnName, Object x, int scale) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateObject(columnName, x, scale);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateObject(String,Object,int)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateObject(String,Object,int)");
            throw sqle;
        }
    }

    public void updateRef(int columnIndex, Ref x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateRef(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateRef(int,Ref)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateRef(int,Ref)");
            throw sqle;
        }
    }

    public void updateRef(String columnName, Ref x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateRef(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateRef(String,Ref)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateRef(String,Ref)");
            throw sqle;
        }
    }

    public void updateRow() throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateRow();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateRow()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateRow()");
            throw sqle;
        }
    }

    public void updateShort(int columnIndex, short x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateShort(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateShort(int,short)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateShort(int,short)");
            throw sqle;
        }
    }

    public void updateShort(String columnName, short x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateShort(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateShort(String,short)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateShort(String,short)");
            throw sqle;
        }
    }

    public void updateString(int columnIndex, String x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateString(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateString(int,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateString(int,String)");
            throw sqle;
        }
    }

    public void updateString(String columnName, String x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateString(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateString(String,String)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateString(String,String)");
            throw sqle;
        }
    }

    public void updateTime(int columnIndex, Time x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateTime(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateTime(int,Time)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateTime(int,Time)");
            throw sqle;
        }
    }

    public void updateTime(String columnName, Time x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateTime(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateTime(String,Time)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateTime(String,Time)");
            throw sqle;
        }
    }

    public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateTimestamp(columnIndex, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateTimestamp(int,Timestamp)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateTimestamp(int,Timestamp)");
            throw sqle;
        }
    }

    public void updateTimestamp(String columnName, Timestamp x) throws SQLException {

        connection.updateLastAccess();
        try {
            results.updateTimestamp(columnName, x);
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "updateTimestamp(String,Timestamp)"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "updateTimestamp(String,Timestamp)");
            throw sqle;
        }
    }

    public boolean wasNull() throws SQLException {

        connection.updateLastAccess();
        try {
            return results.wasNull();
        } catch (SQLException sqle) {
            error(messages.format("DataSource.GeneralMethodError", "wasNull()"), sqle);
            throw sqle;
        } catch (Throwable t) {
            SQLException sqle = connection.createWrappedSQLException(t, "wasNull()");
            throw sqle;
        }
    }

    protected void info(Object message, Throwable error) {

        connection.info(message, error);
    }

    protected void info(Object message) {

        connection.info(message);
    }

    protected void debug(Object message, Throwable error) {

        connection.trace(message, error);
    }

    protected void debug(Object message) {

        connection.trace(message);
    }

    protected void error(Object message, Throwable error) {

        connection.error(message, error);
    }

    protected void error(Object message) {

        connection.error(message);
    }

    protected void warn(Object message, Throwable error) {

        connection.warn(message, error);
    }

    protected void warn(Object message) {

        connection.warn(message);
    }
}
